#pragma once
#include <iostream>
#include <assert.h>
#include <stdbool.h>

using namespace std;

typedef struct ListNode
{
	int val;
	struct ListNode* next;
}ListNode;

typedef struct Queue
{
	ListNode* phead;
	ListNode* ptail;
	int size;
}Queue;

void QueueInit(Queue* pq);
void QueueDestroy(Queue* pq);


void QueuePush(Queue* pq, int x);
void QueuePop(Queue* pq);

int QueueFront(Queue* pq);
int QueueBack(Queue* pq);

void print(Queue* pq);

bool QueueEmpty(Queue* pq);

int QueueSize(Queue* pq);